package org.example.demo3.server.component;

import lombok.Data;
import org.example.demo3.server.service.ChatRoomMessageService;

import javax.websocket.Session;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author ywb
 * @date 2024/8/2 9:07
 */
@Data
public abstract class WebSocketShareParam {

	/**
	 * 存放Session集合，方便推送消息 （jakarta.websocket）
	 */
	public static ConcurrentHashMap<String, Session> sessionMap = new ConcurrentHashMap<>();

	/**
	 * 存放房间用户集合，方便推送消息 （jakarta.websocket）
	 */
	public static HashMap<Long, List<Long>> groupSessionMap = new HashMap<>();

	public static ChatRoomMessageService chatRoomMessageService;

}


